package com.bw.module_message.repository


import com.bw.module_message.http.MessageApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class MessageRepository @Inject constructor(){

    @Inject
    lateinit var api:MessageApi

    fun getMessages(accessId:String, userId:Int) = flow {
        emit(api.getMessages(accessId, userId))
    }.flowOn(Dispatchers.IO)

}
